package com.cw1.factory.factoryMethod.order;

import com.cw1.factory.constant.PizzaConstant;
import com.cw1.factory.factoryMethod.pizza.BjChessPizza;
import com.cw1.factory.factoryMethod.pizza.BjPepperPizza;
import com.cw1.factory.factoryMethod.pizza.Pizza;

/**
 * @Author qiuMi
 * @description 披萨 - 北京 - 订单
 * @Date 2022-10-06 23:46
 **/
public class BjOrderPizza extends OrderPizza{
    @Override
    public Pizza createPizza(String type) {
        Pizza pizza = null;
        if (type.equals(PizzaConstant.CHESS)){
            pizza = new BjChessPizza();
        }else if (type.equals(PizzaConstant.PEPPER)){
            pizza = new BjPepperPizza();
        }
        return pizza;
    }
}
